<?php
/** 
 * $Source: /cvsroot/pn-commerce/pn-commerce/pntemplates/plugins/function.pncModURL.php,v $
 * $Author: pcornelissen $
 * $Revision: 1.5 $
 * $Date: 2003/12/08 12:09:47 $
 *
 * Type: Function
 *
 * Purpose:  creates a link to a given  function
 */
function smarty_function_pncModURL($params, &$smarty)
{
    pnModLoad('pncommerce','user');
    pnModAPILoad('pncommerce','user');
    $module='pncommerce';
    $type='user';
    extract($params); 
	unset($params['module']);
	unset($params['type']);
	unset($params['func']);
	
    if (!isset($module)) {
        $smarty->trigger_error("pncmodurl: attribute module required");
        return false;
    }    

    if (!isset($type)) {
        $smarty->trigger_error("pncmodurl: attribute type required");
        return false;
    }    

    if (!isset($func)) {
        $smarty->trigger_error("pncmodurl: attribute func required");
        return false;
    }    
    
    return pnVarPrepForDisplay(pnModAPIFunc ('pncommerce', 'user','pncModURL',
								array(
								'Module'=>$module,
								'Section'=>$type,
								'Function'=>$func,
								'Args'=>$params)));        
}
?>
